﻿<form id="fsearch" method="post">
        <table cellpadding="0" cellspacing="0" class="tb_searchLeft">
            <tr>
                <th>
                    Tỉnh thành:
                </th>
                <td >
                    @Html.DropDownList("select_Province", ViewBag.sel_Search_Province != null ? (List<SelectListItem>)ViewBag.sel_Search_Province : new List<SelectListItem>(), new { style = "width:100px" })
                </td>
            </tr>            
            <tr>
                <th>
                    Quận,huyện:
                </th>
                <td>
                    <div id="div_district">
                        @Html.Partial("US_District_view")
                    </div>

                    @*@Html.DropDownList("select_Ward",ViewBag.select_Ward!=null? (List<SelectListItem>)ViewBag.select_Ward: new List<SelectListItem>(), new { style = "width:100px" })*@
                </td>
            </tr>
            <tr>
                <th>Phường,xã:</th>
                <td>
                    <div id="div_Ward">
                    @Html.Partial("US_Ward_view")
                    </div>
                </td>
            </tr>
            <tr>
                <th>
                    Loại Nhà:
                </th>
                <td>
                    @Html.DropDownList("select_HomeType", ViewBag.sel_Search_Type != null ? (List<SelectListItem>)ViewBag.sel_Search_Type : new List<SelectListItem>(), new { style = "width:100px" })
                </td>
            </tr>
            <tr>
                <th>
                    LBDS:
                </th>
                <td>
                    @Html.DropDownList("select_BDSType", ViewBag.sel_Search_BDS != null ? (List<SelectListItem>)ViewBag.sel_Search_BDS : new List<SelectListItem>(), new { style = "width:100px" })
                </td>
            </tr>
        </table>
        <a class="btn_boder btn_search" onclick="onSearch()" href="#">Search</a>
        <div style="text-align: right;">
            <a href="#" style="color: #042407;">Tìm kiếm nâng cao ...</a>
        </div>
        </form>
        <script type="text/javascript">

            $(document).ready(function () {

                $("#select_Province").change(function () {
                    showLoading();
                    var proId = this.value;                   
                    var dt = new Date();
                    var href = "/Home/getDistrict?ProId=" + proId + "&dt=" + dt.getTime();
                    $("#div_district").load(href);
                    hideLoading();
                });


            });

        </script>